import request from '@/utils/request'

// 充值卡配置列表
export async function GetConfigPage(params) {
  const res = await request({
    url: '/Recharge/GetConfigPage',
    method: 'post',
    params
  })
  return res
}

// 充值卡配置列表
export async function GetDetailPage(params) {
  const res = await request({
    url: '/Recharge/GetDetailPage',
    method: 'post',
    params
  })
  return res
}

// 新增编辑 充值卡配置
export async function EditConfig(params) {
  const res = await request({
    url: '/Recharge/EditConfig',
    method: 'post',
    params
  })
  return res
}

// 添加生成批次
export async function Create(params) {
  const res = await request({
    url: '/Recharge/Create',
    method: 'post',
    params
  })
  return res
}

// 生成批次记录
export async function GetCreateLogPage(params) {
  const res = await request({
    url: '/Recharge/GetCreateLogPage',
    method: 'post',
    params
  })
  return res
}

// 充值卡配置--详情
export async function FirstConfig(params) {
  const res = await request({
    url: '/Recharge/FirstConfig',
    method: 'post',
    params
  })
  return res
}

// 按生成批次 批量作废
export async function VoidByCreate(params) {
  const res = await request({
    url: '/Recharge/VoidByCreate',
    method: 'post',
    params
  })
  return res
}

// 按充值卡id 批量 作废
export async function VoidByDetail(params) {
  const res = await request({
    url: '/Recharge/VoidByDetail',
    method: 'post',
    params
  })
  return res
}

// 导出
export async function Coupon_excel(params) {
  const res = await request({
    url: '/Recharge/Coupon_excel',
    method: 'get',
    params,
    responseType: 'blob' // arraybuffer也可以
  })
  return res
}
